<?php
$password = $this->formPassword('password', '', array());
$btnButton = $this->formSubmit('submit', 'Save', array('class'=>'button'));
?>

<div class="deal">	
	<div class="deal_content_top"></div>
	<div class="deal_content">
    <?php foreach($this->errors as $error): ?>
    <div class="message"><?php echo $error ?></div>
    <?php endforeach ?>

    <form id="edit-form" action="<?php echo $this->url(array("module" => "admin_user", "controller" => "account", "action" => "editpost")) ?>" method="post">
        <input type="hidden" name="user_id" value="<?php echo $this->user_id ?>" />
        <table style="width: 100%">
            <tr>
                <td style="width: 20%">Tên đăng nhập</td>
                <td><p><strong><?php echo $this->user->username ?></strong></p></td>
            </tr>
            <tr>
                <td style="width: 20%">Email</td>
                <td><input type="text" name="email" value="<?php echo $this->user->email ?>" /></td>
            </tr>
            <tr>
                <td style="width: 20%">Nhóm</td>
                <td>
                    <select name="group_id">
                        <?php foreach($this->groups as $group): ?>
                        <?php if($this->user->group_id == $group->group_id): ?>
                        <option selected="selected" value="<?php echo $group->group_id?>"><?php echo $group->group_name ?></option>
                        <?php else: ?>
                        <option value="<?php echo $group->group_id?>"><?php echo $group->group_name ?></option>
                        <?php endif ?>
                        <?php endforeach ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td style="width: 20%"></td>
                <td><?php echo $btnButton ?></td>
            </tr>
        </table>
    </form>
    <br/><br/>
    <form id="edit-form" action="<?php echo $this->url(array("module" => "admin_user", "controller" => "account", "action" => "changepasspost")) ?>" method="post">
        <input type="hidden" name="user_id" value="<?php echo $this->user_id ?>" />
        <table style="width: 100%">
            <tr>
                <td style="width: 20%">Mật khẩu mới</td>
                <td><?php echo $password ?></td>
            </tr>
            <tr>
                <td style="width: 20%">&nbsp;</td>
                <td><?php echo $btnButton ?></td>
            </tr>
        </table>
    </form>
</div>
<div class="deal_content_bottom"></div>
</div>
